﻿using LibNiconico.NiconicoApi.Utils;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace NiconicoApiHelperUnitTest
{
    [TestFixture]
    class ChatResultStatusUnitTest
    {
        [TestCase(6,NicoChatResultStatusCode.Undefined)]
        [TestCase(5,NicoChatResultStatusCode.Locked)]
        [TestCase(8,NicoChatResultStatusCode.PostKeyError)]
        [TestCase(4,NicoChatResultStatusCode.PostKeyError)]
        [TestCase(3,NicoChatResultStatusCode.TicketError)]
        [TestCase(2,NicoChatResultStatusCode.ThreadError)]
        [TestCase(1,NicoChatResultStatusCode.Failed)]
        [TestCase(0,NicoChatResultStatusCode.Succeed)]
        public void StatusCodeTest(int baseCode,NicoChatResultStatusCode code)
        {
            var status = NicoChatResultStatus.Create(baseCode);

            Assert.AreEqual(baseCode, status.GetBaseCode());

            Assert.AreEqual(code, status.Code);
        }
    }
}
